Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor/133 tracex pj generator #142

Merged
merged 36 commits into from
May 26, 2024
Merged

Conversation

PitButtchereit
Copy link
Collaborator

I've refactored the tracex app and patient journey generator app. Since the tracex app contains functionality that is used in many different files, I've also changed some things outside of the supposed scope.

Remaining: Find a design for function buttons and menu buttons.

@PitButtchereit PitButtchereit linked an issue May 23, 2024 that may be closed by this pull request
@PitButtchereit PitButtchereit self-assigned this May 23, 2024
@tkv29

This comment was marked as resolved.

@tkv29

This comment was marked as resolved.

@tkv29

This comment was marked as resolved.

@tkv29

This comment was marked as resolved.

@tkv29 tkv29 self-requested a review May 23, 2024 17:46
@PitButtchereit
Copy link
Collaborator Author

@PitButtchereit since you did more then the discussed scope did u also informed all other refactoring app owner about this?

Absolutely!

@PitButtchereit

This comment was marked as resolved.

@PitButtchereit
Copy link
Collaborator Author

This code check is now ready to review 👍

@tkv29 tkv29 requested review from thangixd and soeren227 May 24, 2024 14:48
@nils-schmitt

This comment was marked as outdated.

Copy link
Collaborator

@nils-schmitt nils-schmitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good so far, just minor changes (mostly these which i already mentioned in my comment)

tracex_project/patient_journey_generator/__init__.py Outdated Show resolved Hide resolved
cleaned_data = super().clean()
event_types = cleaned_data.get("event_types")
locations = cleaned_data.get("locations")
event_types = cleaned_data.get("event_types", [])
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whats the difference in event_types = cleaned_data.get("event_types") and event_types = cleaned_data.get("event_types", [])?

Copy link
Collaborator Author

@PitButtchereit PitButtchereit May 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The first one will return None if the key event_types is not in the cleaned_data while the second one provides a default argument for that case and will return an empty list. If it's important that None is returned in that case, then please let me know.

@thangixd

This comment was marked as resolved.

@thangixd

This comment was marked as outdated.

thangixd

This comment was marked as outdated.

@PitButtchereit
Copy link
Collaborator Author

PitButtchereit commented May 26, 2024

image I'm not sure if you can rewrite the donwloadxesview like you did. I also wrote it initially like you, but I always get this error. Maybe someone else can check on a Windows computer?

Download trace and event log on the results page

I tested the functionality and it worked for me. @nils-schmitt can you test it?
I will remove the deletion of the temporary file and close it. The temporary file should then be deleted once the Django server shuts down. This means we are taking up more memory, but who cares?

@PitButtchereit
Copy link
Collaborator Author

PitButtchereit commented May 26, 2024

image

has to be fixed in main after the merge since we changed the db prompts

Do you know what is causing the error here?

EDIT: From what I can see on the screenshot, the traceback tells that a prompt is queried that is not even in the database. However, I don't see where this is called in the code.

Copy link
Collaborator

@nils-schmitt nils-schmitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me!

@nils-schmitt
Copy link
Collaborator

Also i have no troubles with the xes downloads @PitButtchereit @thangixd

@thangixd
Copy link
Collaborator

thangixd commented May 26, 2024

image
has to be fixed in main after the merge since we changed the db prompts

Do you know what is causing the error here?

EDIT: From what I can see on the screenshot, the traceback tells that a prompt is queried that is not even in the database. However, I don't see where this is called in the code.

image

in the extraction app under module_patient_journey_preprocessor.py line 61

//edit: idk why but i pulled again now its gone

@thangixd
Copy link
Collaborator

everything is working now! good job pit!

@PitButtchereit PitButtchereit merged commit 62e9d79 into main May 26, 2024
2 checks passed
@nils-schmitt nils-schmitt deleted the refactor/133-tracex-pj-generator branch May 27, 2024 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Code check: tracex + PJ generator
4 participants